<?php
error_reporting(0);
include '../comm/config.php';

if (UC == 1) {
	include '../data/config.inc.php';
	include '../uc_client/client.php';
	
	$email=trim($_GET["email"]);
	echo $ucresult = uc_user_checkemail($email);
    //echo $ucresult; // 1可用  -4格式有误  -5不允许注册  -6已存在
} else {
	$email = trim($_GET["email"]);
	if ($email == '') {
		echo -4;//email不合法
	} else {
		$con = @ mysql_connect("$dbserver", "$dbuser", "$dbpass") or die(ERR_DB);
		mysql_select_db("$dbname", $con) or die("can not choose the dbname!");
		$query = "select * from " . $BIAOTOU . "user where email='" . $email . "'";
		mysql_query("set names utf8");
		$res = mysql_query($query);
		if (mysql_num_rows($res) != 0) {
			echo -6;//email已存在
		} else {
			echo 1;//email可用
		}
	}
}
mysql_close();
?>